{template 'public/header'}
{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_cjdianc/template/public/ygcsslist.css">
<style type="text/css">
    .ygrow{margin-top: 20px;}
    .yg5_key>div{float: left;line-height: 34px;}
    .store_td1{height: 45px;}
    .store_list_img{width: 60px;height: 60px;}
    .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;text-align: center;}
    .yg5_tr2>td{padding: 15px 8px;border: 1px solid #e5e5e5;}
    .yg5_tr1>td{
        border: 1px solid #e5e5e5;
        background-color: #FAFAFA;
        font-weight: bold;
    }
    .ordersucess{background-color: #44ABF7;color: white;}
    .ordersucess:hover{background-color: #44ABF7;color: white;}
    .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
    .inorderbtn2>span,.inorderbtn>button,.inorderbtn>a>button{margin-bottom: 10px;}
    .orfont1{font-weight: bold;font-size: 24px;}
    .orfont2{color: #F5B340;font-size: 16px;margin-left: 15px;}
    .orderback{background-color: #FAFAFA;height: 50px;margin-bottom: 15px;padding: 10px;}
    .ordermain{font-size: 14px;width: 100%;}
    .orfont3{font-size: 20px;font-weight: bold;}
    .orfont4{font-size: 12px;color: #999;}
    .orderconfirm{border:1px solid #44ABF7;color: #44ABF7;padding: 5px 15px;border-radius: 6px;cursor: pointer;margin-right: 10px;}
    .orderconfirm:hover{background-color: #44ABF7;color: white;}
    .orderconfirm2{color: #fff;padding: 3px 10px;border-radius: 6px;margin-right: 10px;font-size: 12px;margin-top: 5px;background-color: #44ABF7;}
    .orderback2{border-bottom:1px solid #E9E9E9;margin-bottom: 10px;padding-bottom: 10px;}
    .orderback3{margin-bottom: 10px;padding-bottom: 10px;}
    .orderback2>div>p{margin-bottom: 5px;}
    .orderdish{margin-bottom: 10px;height: 15px;width: 100%;}
    .orderdish>div{float: left;margin-right: 50px;}
    .orderbox1,.orderdish1{width: 250px;}
    .orderdish>div:nth-child(2){width: 80px;}
    .orderdish>div:nth-child(3){width: 80px;}
    .orderbox2,.orderdish>div:nth-child(4){width: 80px;}
    .orderbox2{margin-left: 310px;}
    .orderaccount{width: 100%;height: 25px;}
    .orfont5{color: #44ABF7;font-size: 14px;}
    .orfont6{font-size: 12px;color: #666;}
    .orfont7{font-weight: bold;font-size: 15px;}
    .dlorfont7{font-size: 18px;color: #44ABF7;}
    .orfont8{color: #44ABF7;}
    .orfont9{color: #666;}
    .orderpanel1{width: 50%;display: inline-block;}
    .orderpanel2{width: 30%;display: inline-block;margin-left: 30px;}
    .ordertelimg{width: 20px;height: 20px;}
    .ordertelimg1{color: #44ABF7;font-size: 14px;}
    .ordername{height: 30px;width: 100%;margin-bottom: 5px;}
    .ordername1{font-size: 20px;font-weight: bold;}
    .orbeizhu{color: #FF7712;}
    .ordertime{margin-right: 10px;}
    .orfont10{color: #999;}
    .orderbtn{border: #FF7F50 1px solid;color: #FF7F50;background-color: #fff;margin-top: -10px;}
    .orderbtn:hover{background-color: #FF7F50;color: white;}
    .ortypeimg{position: absolute;left: 27%;top:53%;z-index: 10;opacity: 0.2;width: 150px;height: 150px;}
    .ortypeimg>img{width: 100%;height: 100%;}
    .ortypeimg2{position: absolute;left: 27%;top:53%;z-index: 10;opacity: 0.4;width: 150px;height: 150px;}
    .ortypeimg2>img{width: 100%;height: 100%;}
    .orderwu{text-align: center;padding: 20px 0px;}
    .wufont1{font-size: 18px;color: #666;margin-top: 20px;}
    .orderconhui{background-color: grey;color: white;}
    .orfontyue1{text-indent: 4em;}
    .data_tip,.nav_head{
          display: flex;
          justify-content: space-between;
          align-items: center;
    }
    .box1{
      	display:flex;
	}
	.back{
		position: absolute;;
		width:100%;
      	background:#000;
      	opacity: .2;
      	left: 0;
      	top: 0;
		height: 100%;
		z-index: 500;
	}
	.add_html{
		margin:auto;
		padding: 0 10px;
		width:40%;
		height: auto;
		border-radius: 10px;
		padding: 20px;
		/*margin:100px 20%;*/
		z-index: 500000000;
		background:#fff;
	}
 </style>
  <!-- 动态添加骑手信息 -->
<div id="add" class="box1" style="width: 100%;height:100%;position: fixed;z-index: 500000000;left: 0">
	<div class="add_html">
		
	</div>
	<div class="back"></div>
</div>
<ul class="nav nav-tabs">
    <span class="ygxian"></span>
    <div class="ygdangq">当前位置:</div> 
    <li {if $type=='now'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>now));}">待接单</a></li>
    <li {if $type=='delivery'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>delivery));}">待送达</a></li>

    <li {if $type=='complete'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>complete));}">已完成</a></li>
    <li {if $type=='zt'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>zt));}">自提订单</a></li>
        <li {if $type=='wait'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>wait));}">待支付</a></li>
<!--     <li {if $type=='dd'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>dd));}">预约到店</a></li> -->
    <li {if $type=='cancel'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>cancel));}">取消/拒绝/退款</a></li> 
    <li {if $type=='all'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type'=>all));}">全部订单</a></li>
</ul>
<div class="row ygrow">
    <div class="col-lg-11 nav_head">
        <form action="" method="get" class="col-md-4" style="padding-left: 0">
            <input type="hidden" name="c" value="site" />
            <input type="hidden" name="a" value="entry" />
            <input type="hidden" name="m" value="zh_cjdianc" />
            <input type="hidden" name="do" value="order" />
            <div class="input-group" style="width: 300px;">
                <input type="text" name="keywords" class="form-control" placeholder="请输入姓名/订单编号/门店名称">
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit" value="查找"/>
                </span>
            </div>
            <input type="hidden" name="token" value="{$_W['token']}"/>
        </form>
        <ul class="nav nav-tabs data_tip col-md-4" style="float: left;margin:0">
         <li{if $type2=='yesterday'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type2'=>yesterday,'type'=>$type));}">昨天</a></li>
            <li{if $type2=='today'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type2'=>today,'type'=>$type));}">今天</a></li>
            <li{if $type2=='week'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type2'=>week,'type'=>$type));}">近七天</a></li>
            <li{if $type2=='month'} class="active" {/if}><a href="{php echo $this->createWebUrl('order',array('type2'=>month,'type'=>$type));}">本月</a></li>
        </ul>        
        <form action="" method="get" class="col-md-6">
                   <input type="hidden" name="c" value="site" />
                   <input type="hidden" name="a" value="entry" />
                   <input type="hidden" name="m" value="zh_cjdianc" />
                   <input type="hidden" name="do" value="order" />
            <div class="input-group" style="width: 100px">
                {php echo tpl_form_field_daterange('time',$_GPC['time'],true);}
                <span class="input-group-btn">
                    <input type="submit" class="btn btn-default" name="submit2" value="查找"/>
                </span>
                 <input type="submit" class="btn btn-sm ordersucess" name="export_submit" value="导出"/>
            </div><!-- /input-group -->
            <input type="hidden" name="token" value="{$_W['token']}"/>
<!--         </form> -->

    </div><!-- /.col-lg-6 -->
</div>  

<div class="main ordermain">
<div class="row">
    <div class="col-md-11">

    {if !$data3}
        <div class="panel panel-default">
            <div class="orderwu">
                <img src="../addons/zh_cjdianc/template/images/noorder.png">
                <p class="wufont1">暂无指定订单</p>
                <p class="orfont10">暂时没有筛选条件的订单，稍后再来看看吧！</p>
            </div>
        </div>
        {/if}
{loop $data3 $key $item}
        <div class="panel panel-default">
            <div class="panel-body" style="padding: 0px 15px;">
                <div class="row" style="position: relative;">
                {if $item['order']['state']==1 || $item['order']['state']==6}
                    <div class="ortypeimg">
                        <img src="../addons/zh_cjdianc/template/images/daizhifu.png">
                    </div>
                             {elseif $item['order']['pay_type']==4}
                    <div class="ortypeimg2">
                        <img src="../addons/zh_cjdianc/template/images/hdfk.png">
                    </div>
                    {else}
                    <div class="ortypeimg2">
                        <img src="../addons/zh_cjdianc/template/images/yizhifu.png">
                    </div>
                    {/if}
                   
                    <div class="col-md-12 orderback">
						
                        <div class="left">
                            <span class="orfont1 orfont8">#{$item['order']['id']}</span>
                            <span>
                            {if $item['order']['order_type']==2}
                                <b style="background: #44ABF7;color: #fff;padding: 5px 15px;border-radius: 5px;font-weight: normal;">到店自提</b>
                            {elseif  $item['order']['order_type']==3}
                                <b style="background: #FF7F50;color: #fff;padding: 5px 15px;border-radius: 5px;font-weight: normal;">预约到店</b>
                            {elseif  $item['order']['pay_type']==4}
                                <b style="background: #FF7F50;color: #fff;padding: 5px 15px;border-radius: 5px;font-weight: normal;">货到付款</b>
                            {elseif $item['order']['order_type']==1}
                                <b style="background: #44ABF7;color: #fff;padding: 5px 15px;border-radius: 5px;font-weight: normal;">外卖配送</b>
                            {/if}
                            </span>
                            &nbsp;|&nbsp;{if $item['order']['order_type']==2}自提时间{else}配送时间{/if}:{$item['order']['delivery_time']}
                             &nbsp;|&nbsp;{$item['order']['ps_mode']}&nbsp;
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'dy','order_id'=>$item['order']['id']));}"><span class="btn btn-xs orderbtn">打印小票</span></a>
                        </div>
                        <div class="right">
                        {if $item['order']['state']==1}
                            <div class="left orderconfirm2">待支付</div>
                        {elseif $item['order']['state']==2}
                            <div class="left orderconfirm2">待接单</div>
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'jd','id'=>$item['order']['id']));}"><div class="left orderconfirm">点击接单</div></a>
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'jjjd','id'=>$item['order']['id']));}"><div class="left orderconfirm">拒接接单</div></a>
                        {elseif $item['order']['state']==3}
                            <div class="left orderconfirm2">待送达</div>
                            <div class="left orderconfirm2 ps_info" id="order_info" value="{$item['order']['id']}">
								<text class="dis_info" value="{$item['order']['ps_mode']}">配送详情</text>
                            </div>
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'wc','id'=>$item['order']['id']));}"><div class="left orderconfirm">点击完成</div></a>
                             <a href="{php echo $this->createWebUrl('order',array('op'=>'cancel','id'=>$item['order']['id']));}"><div class="left orderconfirm">取消订单</div></a>
                           
                        {elseif $item['order']['state']==4}
                            <div class="left label label-xs orderconhui">已完成</div>
                        {elseif $item['order']['state']==5}
                            <div class="left orderconfirm2">已评价</div>
                        {elseif $item['order']['state']==6}
                            <div class="left orderconfirm2">已取消</div>
                            {elseif $item['order']['state']==7}
                            <div class="left orderconfirm2">已拒接</div>
                        {elseif $item['order']['state']==8}
                            <div class="left orderconfirm2">待退款</div>
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'refund','id'=>$item['order']['id']));}"><div class="left orderconfirm">通过退款</div></a>
                            <a href="{php echo $this->createWebUrl('order',array('op'=>'reject','id'=>$item['order']['id']));}"><div class="left orderconfirm">拒绝退款</div></a>
                        {elseif $item['order']['state']==9}
                            <div class="left orderconfirm2">退款成功</div>
                        {elseif $item['order']['state']==10}
                            <div class="left orderconfirm2">退款拒绝</div>
                        {/if}
                        </div>                        
                    </div>
                    <div class="col-md-12 orderback2">
                        <div class="ordername">
                            <div class="left ordername1">{$item['order']['name']} &nbsp;&nbsp;<span class="orfont4">#{$item['order']['md_name']}{if $item['order']['order_type']==3}({if $item['order']['is_dd']==1}已到店{else}未到店{/if}){/if}</span></div>
                            <a href="{php echo $this->createWebUrl('orderinfo',array('id'=>$item['order']['id']));}"><div class="right btn btn-sm btn-default" style="border:none;">查看详情</div></a>
                        </div>
                        <div class="">
                            <div class="left orfont9">{$item['order']['address']}</div>
                            <div class="right ordertelimg1">
                                <img src="../addons/zh_cjdianc/template/images/ordertel.png" class="ordertelimg">
                                <span>{$item['order']['tel']} </span>
                            </div>
                        </div>
                    </div>
                    <div class="col-md-12 orderback2">
                        <p><span class="orbeizhu">备注：</span>{if $item['order']['note']}{$item['order']['note']}{else}无{/if} </p>
                    </div>
                    <div class="col-md-12 orderback2">
                        <p class="orfont3">商品信息</p>
                        {loop $item['goods'] $item2}
                        <div class="orderdish">
                            <div class="left orderdish1">{$item2['name']}{if $item2['spec']}({$item2['spec']}){/if}</div>
                            <div class="left">¥{$item2['money']}</div>
                            <div class="left">×{$item2['num']}</div>
                            <div class="left">¥{php echo number_format($item2['num']*$item2['money'],2)}</div>
                        </div>
                        {/loop}
                    </div>
                    <div class="col-md-12 orderback2">
                        <div class="orderbox1 left">餐盒费</div>
                        <div class="orderbox2 left">¥{$item['order']['box_money']}</div>
                    </div>
                    <div class="col-md-12 orderback2">
                        <div class="orderbox1 left">配送费</div>
                        <div class="orderbox2 left">¥{$item['order']['ps_money']}</div>
                    </div>
                    <div class="col-md-12 orderback2">
                        <p class="orfont3">小计</p>                        
                        <div class="orderaccount">
                            <div class="orderbox1 left">优惠金额</div>
                            <div class="orderbox2 left">¥{php echo number_format($item['order']['discount'],2)}</div>
                        </div>
                        <div class="orderaccount">
                            <div class="orderbox1 left">支付方式</div>
                            <div class="orderbox2 left">{if $item['order']['pay_type']==1}微信支付{elseif $item['order']['pay_type']==2}余额支付{elseif $item['order']['pay_type']==3}积分支付{else}货到付款{/if}</div>
                        </div>                      
                    </div>
                    <div class="col-md-12 orderback2">
                        <div class="orderaccount orfont7">
                            <div class="orderbox1 left">本单预计收入</div>
                            <div class="orderbox2 left">¥{php echo number_format($item['order']['money']-($item['order']['md_poundage']/100*($item['order']['money']-$item['order']['ps_money']))-$item['order']['ps_money']*$item['order']['ps_poundage']/100,2)}</div>
                        
                        </div>
                        <div class="orderaccount orfont6">
                            本单顾客实际支付：¥{$item['order']['money']}
                        </div>                     
                    </div>
                    <div class="col-md-12 orderback3">
                        <div class="right orfont10">
                        <span class="ordertime">下单时间：{$item['order']['time']}</span>
                        订单编号：{$item['order']['order_num']}
                        </div>
                    </div>
                    
                </div>
            </div>
        </div>
{/loop}
    </div>
    


   <!--  <div class="col-md-4">
        <div class="panel panel-default">
            <div class="panel-heading dlorfont7">今日外卖订单</div>
            <div class="panel-body" style="padding: 15px;font-size: 16px;">                
                <p>已完成订单量：<span class="dlorfont7">{$wm2}</span>单</p>
              
                <p>营业额：</p>
                <p>微信完成<span class="dlorfont7">{$wxwm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $wx['total']}{$wx['total']}{else}0.00{/if}</span>元
                </p>
                <p>余额完成<span class="dlorfont7">{$yuewm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $yue['total']}{$yue['total']}{else}0.00{/if}</span>元
                </p>
                <p>
                    积分完成<span class="dlorfont7">{$jfwm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $jf['total']}{$jf['total']}{else}0.00{/if}</span>元
                </p>
            </div>
        </div>
        <div class="panel panel-default">
            <div class="panel-heading dlorfont7">昨日外卖订单</div>
            <div class="panel-body" style="padding: 15px;font-size: 16px;">                
                <p>已完成订单量：<span class="dlorfont7">{$ztwm2}</span>单</p>
              
                <p>微信完成<span class="dlorfont7">{$ztwxwm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $ztwx['total']}{$ztwx['total']}{else}0.00{/if}</span>元
                </p>
                <p>余额完成<span class="dlorfont7">{$ztyuewm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $ztyue['total']}{$ztyue['total']}{else}0.00{/if}</span>元
                </p>
                <p>积分完成<span class="dlorfont7">{$ztjfwm2}</span>单，收入
                    <span class="dlorfont7">¥&nbsp;{if $ztjf['total']}{$ztjf['total']}{else}0.00{/if}</span>元
                </p>
            </div>
        </div>        
    </div> -->



</div>
</div>
<div class="text-right we7-margin-top">{$pager}</div>
<script type="text/javascript">
//                            _ooOoo_
//                           o8888888o
//                           88" . "88
//                           (| -_- |)
//                            O\ = /O
//                        ____/`---'\____
//                      .   ' \\| |// `.
//                       / \\||| : |||// \
//                     / _||||| -:- |||||- \
//                       | | \\\ - /// | |
//                     | \_| ''\---/'' | |
//                      \ .-\__ `-` ___/-. /
//                   ___`. .' /--.--\ `. . __
//                ."" '< `.___\_<|>_/___.' >'"".
//               | | : `- \`.;`\ _ /`;.`/ - ` : | |
//                 \ \ `-. \_ __\ /__ _/ .-` / /
//         ======`-.____`-.___\_____/___.-`____.-'======
//                            `=---='
//
//         .............................................
//                  佛祖镇楼                  BUG辟易
//             佛曰:
//                  写字楼里写字间，写字间里程序员；
//                  程序人员写程序，又拿程序换酒钱。
//                  酒醒只在网上坐，酒醉还来网下眠；
//                  酒醉酒醒日复日，网上网下年复年。
//                  但愿老死电脑间，不愿鞠躬老板前；
//                  奔驰宝马贵者趣，公交自行程序员。
//                  别人笑我忒疯癫，我笑自己命太贱；
//                  不见满街漂亮妹，哪个归得程序员？
    $(function(){
        $("#frame-1").show();
        $("#yframe-1").addClass("wyactive");
        $(".box1").hide();
         $(".box1").click(function(){
         	$(".box1").hide()
         })
         // 判断是否是达达或者快服务
         if($(".dis_info")[0]!=null){
         	var dis_info = $(".dis_info")[0].attributes[1].nodeValue;
         }else{
         	var dis_info = ''
         }
         // var dis_info = ''
         if(dis_info!='达达配送'&&dis_info!='快服务配送'&&dis_info!='商家配送'){
         	// $(".dis_info").hide()
         	var sjData = '{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=GetPtInfo&m=zh_cjdianc'
         }else if(dis_info=='达达配送'){
			var sjData = '{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=GetDadaInfo&m=zh_cjdianc'
         }else if(dis_info=='快服务配送'){
         	// GetDadaInfo
			var sjData = '{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=GetKfwInfo&m=zh_cjdianc'
         }
         console.log(dis_info)
         // 点击详情展开骑手信息
        $(".ps_info").click(function(e){
         	// 获取当前订单的id
         	var order_id = $(this)[0].attributes[2].nodeValue
         	console.log(dis_info)
            $.ajax({
                type:"post",
                url:sjData,
                data:{order_id:order_id},
                success:function(e){
                	console.log(e)
                	var res = JSON.parse(e)
                	console.log(res)
                	addHtml(res)
                	
                },
               	error:function(e){
               		console.log('执行失败')
               	},
               	complete:function(e){
               		console.log('每一步都执行')
               	}
	        })
		})
		// 添加骑手信息
		function addHtml(res){
			if(dis_info!='达达配送'&&dis_info!='快服务配送'){
				if(res.rst.state=='1'){
	    			alert('当前暂无骑手接单')
	    		}else{
		    		res.rst.time = ormatDate(res.rst.time)
		    		if(res.rst.state==1){
		    			res.rst.state='待接单'
		    		}else if(res.rst.state==2){
		    			res.rst.state='已接单'
		    		}else if(res.rst.state==3){
		    			res.rst.state='已到店'
		    		}else if(res.rst.state==4){
		    			res.rst.state='已送达'
		    		}
		    		var html = ''
			    	html += '<h4 style="border-bottom:1px solid #e5e5e5;padding:10px 0;" class="modal-title">'+'骑手信息'+'<text style="float:right;color:#44ABF7">'+res.rst.state+'</text>'+'</h4>',
			    	html += '<p style="padding:5px 0;">'+'订单编号:'+res.rst.order_id+'</p>'
			    	html += '<p style="padding:5px 0;">'+'骑手名字:'+res.rst.name+'</p>'
			    	html += '<p style="padding:5px 0;">'+'联系方式:'+res.rst.tel+'</p>'
			    	html += '<p style="padding:5px 0;">'+'接单时间:'+res.rst.time+'</p>'
			    	$("#add").show();
			    	$(".add_html").html(html)
	    		}
			}else if(dis_info=='达达配送'){
					if(res.transporterName!=null){
					var html = ''
			    	html += '<h4 style="border-bottom:1px solid #e5e5e5;padding:10px 0;" class="modal-title">'+'骑手信息'+'<text style="float:right;color:#44ABF7">'+res.statusMsg+'</text>'+'</h4>',
			    	html += '<p style="padding:5px 0;">'+'订单编号:'+res.orderId+'</p>'
			    	html += '<p style="padding:5px 0;">'+'骑手名字:'+res.transporterName+'</p>'
			    	html += '<p style="padding:5px 0;">'+'联系方式:'+res.transporterPhone+'</p>'
			    	html += '<p style="padding:5px 0;">'+'接单时间:'+res.acceptTime+'</p>'
			    	$("#add").show();
			    	$(".add_html").html(html)
				}else{
					alert('暂无骑手接单')
				}
					
			}else if(dis_info=='快服务配送'){
				if(res.courise_name!=null){
					var html = ''
					if(res.state==1){
						res.state = '已接单'
					}else if(res.state==2){
						res.state = '已到店'
					}else if(res.state==3){
						res.state = '已送达'
					}
			    	html += '<h4 style="border-bottom:1px solid #e5e5e5;padding:10px 0;" class="modal-title">'+'骑手信息'+'<text style="float:right;color:#44ABF7">'+res.state+'</text>'+'</h4>',
			    	html += '<p style="padding:5px 0;">'+'订单编号:'+res.orderId+'</p>'
			    	html += '<p style="padding:5px 0;">'+'骑手名字:'+res.courise_name+'</p>'
			    	html += '<p style="padding:5px 0;">'+'联系方式:'+res.courise_mobile+'</p>'
			    	html += '<p style="padding:5px 0;">'+'接单时间:'+res.acceptTime+'</p>'
			    	$("#add").show();
			    	$(".add_html").html(html)
				}else{
					alert('暂无骑手接单')
				}
					
			}
			
		}
        // -----------------------------时间戳转换日期时分秒--------------------------------
	  function ormatDate(dateNum) {
	    var date = new Date(dateNum * 1000);
	    return date.getFullYear() + "-" + fixZero(date.getMonth() + 1, 2) + "-" + fixZero(date.getDate(), 2) + " " + fixZero(date.getHours(), 2) + ":" + fixZero(date.getMinutes(), 2) + ":" + fixZero(date.getSeconds(), 2);
	    function fixZero(num, length) {
	      var str = "" + num;
	      var len = str.length;
	      var s = "";
	      for (var i = length; i-- > len;) {
	        s += "0";
	      }
	      return s + str;
	    }
	  }
    })
</script>